<%--
  Created by IntelliJ IDEA.
  User: sunny
  Date: 2017/9/14
  Time: 15:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="${ctx}/js/qrcode.js"></script>
    <script type="text/javascript">
        window.onload =function(){
            var qrcode = new QRCode(document.getElementById("qrcode"), {
                width : 96,//设置宽高
                height : 96
            });
            qrcode.makeCode("http://www.baidu.com");
            document.getElementById("send").onclick =function(){
                qrcode.makeCode(document.getElementById("getval").value);
            }
        }
    </script>
</head>
<body>
<div id="qrcode">
</div>
<input type="text" id="getval"/> <button id="send">点击更换验证码</button>
</body>
</html>
